/********************************************************/
/*	Copyright (C) 2016 Gong Li Bin		 	*/
/*	Project:	GoLib-1.0.0			*/
/*	Author:		gong_libin			*/
/*	Date:		2016_01_01			*/
/*	File:		GoChanTest.go			*/
/********************************************************/

package main

import (
	. "GoGlb"
	C "GoCap"
	S "GoCls"
)

func main() {
	c := [10]C.GoChan{}
	for i := 0; i < 10; i ++ {
		c[i].GoChanNew(1)
		go test(c[i])
	}
	//for {
		for i, v := range(c) {
			S.GoTimeSleep(0, 100000000)
			v.GoChanPut(i)
		}
	//}
}

func test(c C.GoChan) {
	for i := 0; ; i ++ {
		GoPrint("Chan[%04d]: %d\n", i, c.GoChanGet())
	}
}
